<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8" src="/My97DatePicker/WdatePicker.js"></script>

<style>
    #login-button{
        background: #286090!important;
        color: white!important;
        border: 1px solid #286090!important;
        border-radius: 3px;
    }
</style>
<div class="span10">
    <div style="margin-bottom: 20px;">
        <a href="/index/index">首页</a>
        <span >&gt;</span>
        <span>考试日历</span>
        <span >&gt;</span>
        <span>添加</span>
    </div>
    <form class="form" method="post" action="<?php echo baseUrl."/content/calendar/add"?>" enctype="multipart/form-data">
        <table>
            <tr>
                <td>年份 *</td>
                <td ><input type="text" style="width: 600px;" name="year" placeholder="" value="<?php echo isset($data)? $data['year']:''?>"/></td>
            </tr>
            <tr>
                <td>月 *</td>
                <td ><input type="text" style="width: 600px;" name="month" placeholder="" value="<?php echo isset($data)? $data['month']:''?>"/></td>
            </tr>
            <tr>
                <td>日 *</td>
                <td ><input type="text" style="width: 600px;" name="date" placeholder="" value="<?php echo isset($data)? $data['date']:''?>"/></td>
            </tr>

            <tr>
                <td>考试类别 *:</td>
                <td>
                    <select name="cate">
                        <option value ="">请选择班级</option>
                        <option value ="A" <?php echo isset($data)&& $data['cate']=="A" ?  'selected':''?>>A类</option>
                        <option value ="G" <?php echo isset($data)&& $data['cate']=="G" ?  'selected':''?>>G类</option>
                        <option value ="A+G" <?php echo isset($data)&& $data['cate']=="A+G" ?  'selected':''?>>A+G类</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>报名截止期:</td>
                <td>
                    <input class="input-small Wdate" onclick="WdatePicker()" type="text" size="10" name="endTime"
                           value="<?php echo isset($data['endTime']) ? date('Y-m-d',$data['endTime']) : '' ?>"/>
                </td>
            </tr>
            <tr>
                <td>准考证打印期:</td>
                <td>
                    <input class="input-small Wdate" onclick="WdatePicker()" type="text" size="10" name="printTime"
                           value="<?php echo isset($data['printTime']) ? date('Y-m-d',$data['printTime']) : '' ?>"/>
                </td>
            </tr> <tr>
                <td>成绩单寄送日期:</td>
                <td>
                    <input class="input-small Wdate" onclick="WdatePicker()" type="text" size="10" name="sendTime"
                           value="<?php echo isset($data['sendTime']) ? date('Y-m-d',$data['sendTime']) : '' ?>"/>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center"> <button type="submit" id="login-button">添加考试日历</button></td>
            </tr>
            <input type="hidden" name='id' value="<?php echo isset($data)? $data['id']:''?>"/>
            <input type="hidden" name="_csrf" value="<?=Yii::$app->request->getCsrfToken()?>" />
        </table>
    </form>
</div>
<script>
    //实例化编辑器
    var ue = UE.getEditor('editor');
    var plan = UE.getEditor('plan');
    var intro = UE.getEditor('intro');
</script>